﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace LS.Models
{
    public class LostFoundHistoryContext : DbContext
    {
        public LostFoundHistoryContext()
            : base("DefaultConnection")
        {
        }

        public DbSet<LostFoundHistory> LostFoundHistories { get; set; }

        public DbSet<MemberCard> MemberCards { get; set; }
    }

    [Table("LostFoundHistory")]
    public class LostFoundHistory
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [ForeignKey("RelatedMemberCard")]
        public int MemberCardId { get; set; }
        public virtual MemberCard RelatedMemberCard { get; set; }

        public DateTime ReportDate { get; set; }

        public DateTime UpdateDate { get; set; }

        public int Status { get; set; }

        public string ReportContact { get; set; }

    }

    public enum Status
    {
        Found=0,
        InService,
        NeedRenew,//red in ui maybe
    }

    public class LostFoundHistoryModel
    {

    }

    public class FindModel 
    {
        public string SeiralNumber { get; set; }
        public string ReportContact { get; set; }
    }

    public class FoundResultModel 
    {
        public string Description { get; set; }
        public string ContactType { get; set; }
        public string ContactContent { get; set; }
    }
}